feat(connectors): add connectors list-available command - #367
Merged
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.41-pr.367.40b1ab1Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.41-pr.367.40b1ab1"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.41-pr.367.40b1ab1"
}
}
Preview published to npm registry — try new features instantly! |
Paveltarno
force-pushed
the
feat/connectors-list-available
branch
from
March 8, 2026 07:29
5ab8c99 to
2d0b584
Compare
Paveltarno
commented
Mar 9, 2026
| "tmp-promise": "^3.0.3", | ||
| "typescript": "^5.7.2", | ||
| "vitest": "^4.0.16", | ||
| "yaml": "^2.8.2", |
Collaborator
Author
There was a problem hiding this comment.
added this yaml dep, i think it's worth it:
- we should probably just start formatting yaml as part of our regular clack output, it integrates pretty well and we don't need to manually fiddle with formatting our domain entities
- we might just add
--output yamlwith no extra cost
artemdemo
reviewed
Mar 9, 2026
Paveltarno
force-pushed
the
feat/connectors-list-available
branch
from
March 9, 2026 12:46
d2f9ad9 to
8059d7d
Compare
Add a new CLI command to discover all available integration types from the Base44 catalog endpoint (GET /external-auth/available-integrations). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrapper key: `available_integrations` → `integrations` - Remove `notes` and `usage_guide` fields (dropped from backend) - Extract long template literal for readability Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Print the complete integration data (including connection_config_fields) as JSON to stdout so LLMs and scripts can consume all fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add yaml dep for pretty-printing integration details - Display each integration as YAML (type, description, config fields) - Keep connection_config_fields in snake_case (no transform) - Remove temp fake fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep consistent with codebase convention — convert snake_case to camelCase at the Zod boundary for all fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use camelCase key `connectionConfigFields` in YAML output - Strip null/undefined values from config fields before display - Add comment explaining z.string() choice over IntegrationTypeSchema - Add test for malformed API response (Zod validation) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename loop variable `i` to `integration` (review #2) - Use typed destructuring instead of Record<string, unknown> (review #3) - Extract reusable formatYaml() utility with stripEmpty option (review #4) - Use lodash isEmpty for null/empty stripping in YAML replacer - Add formatYaml unit tests - Update test assertions for integrationType key rename Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Paveltarno
force-pushed
the
feat/connectors-list-available
branch
from
March 9, 2026 15:37
c79fcca to
16ea336
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Paveltarno
force-pushed
the
feat/connectors-list-available
branch
from
March 9, 2026 15:45
9af8b32 to
2e5842d
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kfirstri
approved these changes
Mar 9, 2026
artemdemo
reviewed
Mar 9, 2026
| for (const { displayName, ...rest } of integrations) { | ||
| const yaml = formatYaml(rest); | ||
| const pad = " ".repeat(YAML_INDENT); | ||
| log.info(`${displayName}\n${pad}${yaml.replace(/\n/g, `\n${pad}`)}`); |
Contributor
There was a problem hiding this comment.
@Paveltarno why this part is not happening in formatYaml?
Contributor
There was a problem hiding this comment.
I'm referring to padding.
Collaborator
Author
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
I see, thank you for clarification
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.

Note
Description
This PR adds a new
connectors list-availablesubcommand that fetches and displays all available integration types from the Base44 API. Each integration is rendered in human-readable YAML format with a reusableformatYamlhelper that strips empty/null values by default. The changes align with the existing connectors command pattern and include full test coverage for both the command and the YAML utility.Related Issue
None
Type of Change
Changes Made
connectors list-availablecommand that callsGET /external-auth/available-integrationsand prints each integration as YAMLlistAvailableIntegrations()API function incore/resources/connector/api.tswith Zod validation and snake_case→camelCase transformListAvailableIntegrationsResponseSchemaandConnectionConfigFieldSchematoconnector/schema.tsformatYaml()helper inpackages/cli/src/cli/utils/yaml.tswith configurable empty-value stripping usinglodash.isEmptylist-availableas a subcommand on the existingconnectorscommandyamlpackage dependency and updatedbun.lockformatYamlcovering null/undefined/empty stripping and nested objectspackages/cli/plan.md(working notes, not needed in repo).claude/worktrees/to.gitignoreTesting
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The
AvailableIntegrationSchemaintentionally usesz.string()instead ofIntegrationTypeSchemaso the command works with integration types not yet defined in the CLI's enum — this ensures forward compatibility as new integrations are added on the server side.🤖 Generated by Claude | 2026-03-09 00:00 UTC