Skip to content

[CLI] Portal Extensions microservice client support#4610

Merged
cdhanna merged 15 commits into
mainfrom
issue/portal-extensions-micro
May 27, 2026
Merged

[CLI] Portal Extensions microservice client support#4610
cdhanna merged 15 commits into
mainfrom
issue/portal-extensions-micro

Conversation

@gabrielbeamable
Copy link
Copy Markdown
Contributor

@gabrielbeamable gabrielbeamable commented May 20, 2026

Summary

  • Fix portal extension dependency management to read/write microserviceDependencies under the beamable key in package.json instead of at the root level
  • Generate TypeScript clients (.ts) instead of JavaScript (.js) and fix SDK import paths to use @beamable/sdk instead of beamable-sdk
  • Handle content manifest 404 as an empty manifest in the Web SDK, fixing errors on realms with no published content
  • Change RequestPortalExtensionData from [ClientCallable] to [Callable] to remove the requirement for an initialized player
  • Fix dev-web.sh to publish with --tag local to avoid polluting the latest npm tag

Changes

Portal Extension dependency & client generation (cli/)

  • PortalExtensionAddDependencyCommand.cs: Dependencies are now read/written under package.json > beamable > microserviceDependencies instead of the root. Added validation that the beamable field exists. Split the skip condition for missing dependencies vs missing OpenAPI doc, with a warning log when the doc
    isn't available. Client code is now generated as .ts files.
  • PortalExtensionConstants.cs: Added EXTENSION_BEAMABLE_PROPERTY_NAME constant for the new beamable key.
  • WebClientCodeGenerator.cs: Fixed import paths from beamable-sdk and beamable-sdk/schema to @beamable/sdk and @beamable/sdk/schema.
  • React template tsconfig.json: Added beamable/**/*.ts to include so generated client types are picked up.

Portal Extension discovery (PortalExtensionDiscoveryService.cs)

  • Changed [ClientCallable] to [Callable] so portal extensions can be served without requiring a fully initialized player session.

Web SDK content service (ContentService.ts)

  • Wrapped manifest checksum fetch in try/catch to handle 404 responses gracefully — treats them as an empty manifest instead of crashing. Added isManifestNotFound helper.

Dev tooling (dev-web.sh)

  • Added --tag local to pnpm publish commands to prevent local dev builds from overwriting the latest tag in the local registry.

Test plan

  • Run beam pe add-dep on a portal extension with a microservice dependency — verify package.json is updated under beamable.microserviceDependencies and a .ts client is generated with correct @beamable/sdk imports
  • Load a portal extension in the portal without being logged in as a player — verify it loads (no ClientCallable auth requirement)
  • Open a realm with no published content — verify no crash and content page shows empty state
  • Run dev-web.sh — verify packages are published with --tag local in the local registry

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@github-actions
Copy link
Copy Markdown
Contributor

Web SDK Sample Build link

@github-actions
Copy link
Copy Markdown
Contributor

Lightbeam link

@cdhanna cdhanna merged commit f83367b into main May 27, 2026
28 of 29 checks passed
@cdhanna cdhanna deleted the issue/portal-extensions-micro branch May 27, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants