fix(api): resolve Veryfront imports in Deno temp modules - #3547
Conversation
Bundled API handlers execute from temporary directories, so non-compiled Deno routes must replace external Veryfront imports with file URLs derived from the active package export map. Constraint: Deno scaffolds run Veryfront through an exact npm task and do not declare Veryfront as a project dependency. Rejected: Add Veryfront to every Deno project dependency list | duplicates the task-owned runtime and permits package drift. Rejected: Use import.meta.resolve directly | the npm build ponyfill loses package self-resolution. Confidence: high Scope-risk: narrow Directive: Keep compiled Deno on runtime shims and validate package export containment before emitting file URLs. Tested: API module-loader suites, formatting, lint, typecheck, and generated Deno docs-agent scaffold/install/build/serve/browser flow including GET /api/uploads. Not-tested: Remaining template and runtime production matrix is pending.
|
Warning Review limit reached
Next review available in: 17 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
veryfrontimports through the running package export mapRoot cause
Fresh Deno projects do not inherit this repository's import map. When a generated API route had to use the bundled temporary-module path, bare imports such as
veryfront/embeddingremained external. Deno then evaluated the temporary file outside the installed package context and could not resolve the framework import.Using
import.meta.resolvealone was insufficient because the packed npm build uses a DNT resolver ponyfill that loses package self-resolution. This change reads the active package export map and converts framework imports to contained file URLs before Deno evaluates the temporary module.Verification
/,/uploads, browser checks, and/api/uploadswith a clean network logRelated: veryfront/veryfront-issue-inbox#456