feat: hostless package discovery — list-available-packages, list-package-components, fix version encoding#163
Merged
Conversation
…age-components, fix version encoding - Fix add-package/upgrade-package crash (gap #22): omit version query param when requesting latest; JSON-stringify specific versions before URI-encoding - Add project.list-available-packages action: browse installable hostless package catalog from /api/v1/app-config with isInstalled cross-reference - Add project.list-package-components action: list components from installed hostless packages with optional packageName filter - Add getAppConfig() API client method, AvailablePackage/PackageComponent types - Update tests: version encoding, getAppConfig, listAvailablePackages, listPackageComponents (1,629 tests pass)
e9e75fc to
f85a396
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add-package/upgrade-packageHTTP 500):api-client.tswas sending?version=latestas a raw string; the WAB server doesJSON.parse(req.query.version)which throwsSyntaxError. Fix: omit the version query param entirely when requesting latest (server defaults correctly), and JSON-stringify + URI-encode when a specific version is needed.project.list-available-packages: CallsGET /api/v1/app-config, extractshostLessComponents, and returns the full installable package catalog (same source as Studio's Insert Panel) withisInstalledflags cross-referenced against current project dependencies. Filters hidden packages by default.project.list-package-components(gap 23): Lists components provided by installed hostless packages, cross-referencingProjectDependencysite data withHostLessComponentInfometadata. Supports optionalpackageNamefilter.Test plan
npm testpasses with zero failuresproject.add-packageno longer returns HTTP 500 on EP serverproject.list-available-packagesreturns package catalog with correctisInstalledflagsproject.list-package-componentsreturns components from installed packagesproject.list-available-packages→project.add-packageround-trip works end to end