Repository navigation
fix(deploy): don't fail a successful publish when the app URL lookup is refused - #671
Merged
Merged
Conversation
…is refused The URL lookup after publishing goes through a platform route that refuses a workspace API key, so `base44 deploy --git-hash` with BASE44_API_KEY exited 1 after putting the commit live. The lookup is now best effort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tmb4PCrrV2SLRpBjkGAgXJ
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.2.0-pr.671.556605bPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.2.0-pr.671.556605b"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.2.0-pr.671.556605b"
}
}
Preview published to npm registry — try new features instantly! |
netanelgilad
pushed a commit
to base44/apps-examples
that referenced
this pull request
Oct 21, 2026
Contributor
Author
|
Verified end to end with this PR's preview ( Generated by Claude Code |
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
base44 deploy --git-hash(andsite deploy --publish) exited 1 after the commit was already live, because the step following the publish —getSiteUrl(), which calls the platform routeGET /api/apps/platform/{id}/published-url— refuses a workspace API key (BASE44_API_KEY), while every app-scoped call before it accepts the same key. This PR makes that URL lookup best effort: the publish's own errors still fail the command, but a refused URL lookup now leavesPublishedDeployment.appUrlunset and the deploy reports success without theApp URLline. It was seen in the first CI deploy of base44/apps-examples's TanStack example, where the server confirmed the publish had gone through.Related Issue
None. (Making
published-urlaccept workspace keys is a separate apper-side change; this PR stops the CLI from reporting a live deploy as failed either way.)Type of Change
Changes Made
core/site/api.ts:publishDeployment()now wrapsgetSiteUrl()in.catch(() => undefined)so a refused URL lookup can't fail an already-successful publish, with a comment explaining why.core/site/schema.ts:PublishedDeployment.appUrlis now optional (appUrl?: string), and its doc comment reflects that the URL is only present when it could be looked up.cli/commands/site/deploy.ts: theApp URLline is printed only whenpublished?.appUrlis set; the "Not published" hint is now gated on!publishedso it is not shown for a successful publish with a missing URL.tests/cli/deploy.spec.ts: new case where the publish succeeds butpublished-urlreturns 401 — the deploy still succeeds and the commit is recorded as published.CHANGELOG.md: entry underFixed.Testing
npm test)The new
deploy.speccase fails without the fix and passes with it.deploy,site_deploy,static_site_deploymentsandfullstack_deployspecs: 53 passed.bun run typecheckandbun run lintare clean.Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
No architectural change, so
docs/needed no update — the deployment flow described indocs/deployments.mdis unchanged; only the post-publish URL lookup's failure handling differs. The other consumer ofappUrl,cli/commands/project/deploy.ts, already guarded onresult.appUrlbefore printing, so it needed no change.🤖 Generated by Claude | 2026-10-21 13:48 UTC | 556605b