fix(logs): avoid loading local project resources - #607
Merged
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.10-pr.607.4743740Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.10-pr.607.4743740"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.10-pr.607.4743740"
}
}
Preview published to npm registry — try new features instantly! |
talge-a11y
previously approved these changes
Aug 27, 2026
davidsu
added a commit
that referenced
this pull request
Aug 27, 2026
bun 1.4.0 has no @oven/bun-darwin-aarch64 (or any other target package) published on npm, so `bun build --compile --target=...` fails to download the target executable and every `build` job on main goes red. Pin the two jobs that cross-compile — test.yml's build job and manual-publish.yml — to 1.3.14, the last version with all five target packages on npm. Other workflows stay on latest; they never cross-compile. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
davidsu
force-pushed
the
fix/logs-skip-local-project-scan
branch
from
August 27, 2026 10:26
98c69ef to
aa4d559
Compare
talge-a11y
approved these changes
Aug 27, 2026
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 logsused to read the local project config to figure out which functions to fetch logs for. That meant an unrelated local config error (e.g. an invalid entity file) could break a purely remote, read-only command, and the "function not found" hint listed local functions rather than what is actually deployed. This PR makes the command source function names exclusively from the deployed-functions API, and only when it actually needs them.It also hardens the 404 path: the available-functions hint is now looked up lazily, and if that lookup fails the original logs error is rethrown instead of being masked by a secondary failure. When the hint does succeed, the 404 is attached as the
causeof the resultingInvalidInputError.Related Issue
None
Type of Change
Changes Made
readProjectConfig/getProjectFunctionNamesfromlogs.ts— the command no longer loads local project resources, so a broken local config cannot fail a remote log fetch.listDeployedFunctions(), and only when--functionis omitted; with--functionspecified no list call is made at all.getFunctionNamesForHint(): on a 404 it lazily fetches deployed function names for the hint, and rethrows the original logs error if that fetch fails, so a secondary error never masks the real one.InvalidInputErrorfor a missing function now carries the 404ApiErroras itscause, and the hint text reads "Available functions in this app" instead of "in this project".--functionhelp text to say logs are fetched for "all deployed functions" when the flag is omitted.--function, listing deployed names in the 404 hint, and preserving the original error when the hint lookup fails; reworked existing tests to mock the functions list and removed now-unnecessary mocks.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
Behavior change worth noting: inside a local project,
base44 logswith no--functionnow lists logs for functions deployed to the app rather than functions declared locally. Functions that exist locally but have never been deployed will no longer appear — which matches what the logs API can actually return.The test suite was not executed in this environment (running it needs
bun run buildfirst), so the "tested locally"/"all tests pass" boxes are left unchecked pending CI.🤖 Generated by Claude | 2026-08-27 10:26 UTC | 4743740