Skip to content

feat: support Helix backend#160

Merged
bosschaert merged 8 commits into
mainfrom
api-live-switch
Jun 8, 2026
Merged

feat: support Helix backend#160
bosschaert merged 8 commits into
mainfrom
api-live-switch

Conversation

@bosschaert

@bosschaert bosschaert commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

When document host is api.aem.live use Helix as backend storage instead of da-admin.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

When x-forwarded-host === api.aem.live then use api.aem.live as backend
storage instead of da-admin.
@bosschaert bosschaert marked this pull request as ready for review May 28, 2026 12:22
Comment thread src/shareddoc.js Outdated
Comment on lines +299 to +305
} else {
const blob = new Blob([content], { type: mimeType });
const formData = new FormData();
formData.append('data', blob);
putBody = formData;
bodySize = blob.size;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that da admin now supports raw post bodies?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it does, but I think the switch to that should be a different PR. This PR keeps everything the same for accessing da-admin.

Comment thread src/shareddoc.js Outdated
Comment on lines +25 to +28
export function getFetchObj(isHelix, daadmin) {
return isHelix ? globalThis : daadmin;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #92 ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#92 wasn't done yet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It never made it. I have no clue if calling da-admin via our own fetch is better than using worker bindings. This would need to be tested more deeply.

bosschaert and others added 2 commits June 4, 2026 13:58
Replace the isHelix flag — threaded through get/put/update/bindState/
getYDoc/setupWSConnection/handleWebSocketMessage, an X-is-helix header,
and the DocRoom hibernation attachment — with a single getBackend(docName,
daadmin) resolver plus an isHelixDoc(docName) predicate. The backend is a
pure function of the doc URL, so each call site derives it locally rather
than transporting a boolean. getBackend encapsulates fetch routing and PUT
request building; the auth-actions default is inlined at its one use site
in DocRoom (a DocRoom concern, not a storage-backend one).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bosschaert bosschaert merged commit b62a603 into main Jun 8, 2026
5 checks passed
@bosschaert bosschaert deleted the api-live-switch branch June 8, 2026 10:22
adobe-bot pushed a commit that referenced this pull request Jun 8, 2026
# [1.7.0](v1.6.0...v1.7.0) (2026-06-08)

### Features

* support Helix backend ([#160](#160)) ([b62a603](b62a603))
@adobe-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants