fix(logs): normalize Deno Deploy "warn" level to "warning"#549
Merged
Conversation
Deno Deploy returns "warn" in some runtime versions. Normalize it to "warning" at parse time so the schema doesn't throw on valid log entries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.56-pr.549.43ef1d0Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.56-pr.549.43ef1d0"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.56-pr.549.43ef1d0"
}
}
Preview published to npm registry — try new features instantly! |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lues
console.log() on Cloudflare Workers returns level "" (empty string).
console.warn() returns "warn". Normalize both to the canonical values
("info" and "warning") that Deno Deploy uses per its OpenAPI spec.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kfirstri
approved these changes
Jun 24, 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
Backend function log entries can arrive with runtime-specific log levels that don't match the canonical set the CLI expects (
info,warning,error,debug). These non-canonical values caused Zod validation to fail when displaying logs. This PR adds az.preprocessstep that normalizes incoming levels — mapping"warn"to"warning"(Deno Deploy, Cloudflare) and empty/missing or"log"values to"info"(Cloudflare) — before schema validation.Related Issue
None
Type of Change
Changes Made
Testing
Checklist
Additional Notes
The fix preserves any already-canonical level unchanged, so it is fully backward compatible. No tests were added for the normalization logic.
🤖 Generated by Claude | 2026-06-22 13:45 UTC | 43ef1d0