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
Leinnan added a commit that referenced this pull request May 28, 2026
commit 582e809
Author: Chris Hanna <chris@beamable.com>
Date:   Wed May 27 15:06:50 2026 -0400

    rc2

commit d900fc8
Author: VitorBeamable <vitor@beamable.com>
Date:   Wed May 27 13:20:55 2026 -0300

    Fix and Improvements to Admin Console (#4619)

    * Add UIScaler in the ConsoleConfiguration and add Toggle behaviour to the Admin Console

    * Remove close button

    * Rework the Input system in the BeamableAdminConsole to improve the stability

    * Add InputSystem dll to Unity.Beamable asmdef

    * Fix cursor when using tab to autocomplete

    * Beam "Samples" Toolbar Menu Item

    * Check if TMPro Resources are in the project. Import TMP Resource Package if does not.

    * Redo missing fix that foce hide when using legacy Input system since the texfield intercept all calls and consume them before the Update

commit fc92b80
Author: felipe-beamable <felipe@beamable.com>
Date:   Wed May 27 13:18:16 2026 -0300

    Fix - Flatten start-session event for athena acceptance (#4621)

    * Fix - Flatten start-session event for athena acceptance

commit f83367b
Author: gabrielbeamable <141041673+gabrielbeamable@users.noreply.github.com>
Date:   Wed May 27 12:29:13 2026 -0300

    [CLI] Portal Extensions microservice client support (#4610)

    * remove need to have an initialized player to show a portal extension

    * fix dev web script for newer pnpm version

    * Fix error when trying to add dep to PE and generating client

    * websdk fix, content manifest 404 should be considered just empty manifest

    * fix portal extension client gen

    * generate typescript client for pe and fix client generation

    * update react template

    * fix template updater

    * debug install log

    * attempt install

    * gate source

    * cli issues

    * namespace

    * test

    * lower case

    ---------

    Co-authored-by: Chris Hanna <chris@beamable.com>

commit 545788d
Author: DiasAtBeamable <gmoraes@beamable.com>
Date:   Tue May 26 14:34:25 2026 -0300

    feature: Added support for detecting remote portal extensions in project ps. (#4618)
cdhanna pushed a commit that referenced this pull request May 28, 2026
* Fix culture info issues

* Otel collection performance fixes

* Performance improvements

* Revert "Otel collection performance fixes"

This reverts commit db05bbb.

* DirectoryUtils fix

* fix: restore manifest scanning logic for CLI generate-env tests

* Revert "fix: restore manifest scanning logic for CLI generate-env tests"

This reverts commit 6c4c4ea.

* Squashed commit of the following:

commit 582e809
Author: Chris Hanna <chris@beamable.com>
Date:   Wed May 27 15:06:50 2026 -0400

    rc2

commit d900fc8
Author: VitorBeamable <vitor@beamable.com>
Date:   Wed May 27 13:20:55 2026 -0300

    Fix and Improvements to Admin Console (#4619)

    * Add UIScaler in the ConsoleConfiguration and add Toggle behaviour to the Admin Console

    * Remove close button

    * Rework the Input system in the BeamableAdminConsole to improve the stability

    * Add InputSystem dll to Unity.Beamable asmdef

    * Fix cursor when using tab to autocomplete

    * Beam "Samples" Toolbar Menu Item

    * Check if TMPro Resources are in the project. Import TMP Resource Package if does not.

    * Redo missing fix that foce hide when using legacy Input system since the texfield intercept all calls and consume them before the Update

commit fc92b80
Author: felipe-beamable <felipe@beamable.com>
Date:   Wed May 27 13:18:16 2026 -0300

    Fix - Flatten start-session event for athena acceptance (#4621)

    * Fix - Flatten start-session event for athena acceptance

commit f83367b
Author: gabrielbeamable <141041673+gabrielbeamable@users.noreply.github.com>
Date:   Wed May 27 12:29:13 2026 -0300

    [CLI] Portal Extensions microservice client support (#4610)

    * remove need to have an initialized player to show a portal extension

    * fix dev web script for newer pnpm version

    * Fix error when trying to add dep to PE and generating client

    * websdk fix, content manifest 404 should be considered just empty manifest

    * fix portal extension client gen

    * generate typescript client for pe and fix client generation

    * update react template

    * fix template updater

    * debug install log

    * attempt install

    * gate source

    * cli issues

    * namespace

    * test

    * lower case

    ---------

    Co-authored-by: Chris Hanna <chris@beamable.com>

commit 545788d
Author: DiasAtBeamable <gmoraes@beamable.com>
Date:   Tue May 26 14:34:25 2026 -0300

    feature: Added support for detecting remote portal extensions in project ps. (#4618)

* Simplify msbuild project loading

* Instead of awaiting for remote manifest at start do as much work possible until it is required with it working in the background

* Revert "Squashed commit of the following:"

This reverts commit 5882ca5.

* Update changelog

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Chris Hanna <chris@beamable.com>
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