feat(devframe): re-export nostics via devframe/utils/nostics - #243
Merged
Conversation
Add devframe/utils/nostics as a thin re-export of nostics's public API (defineDiagnostics, the Diagnostic class, its supporting types, and ansiFormatter). Route every built-in plugin diagnostics.ts (assets, code-server, data-inspector, inspect, messages, og, terminals) plus @devframes/hub and @devframes/json-render through it, and drop their direct nostics dependency now that devframe (already a peer) supplies it. devframe's own internal diagnostics modules switch to the same self-referenced import for consistency.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…/nostics
Move the ANSI console reporter registration into the shared
`devframe/utils/nostics` `defineDiagnostics` wrapper, which pre-wires it
ahead of any caller-supplied reporters. Every module-level
`diagnostics.ts` (devframe core, @devframes/hub, @devframes/json-render,
and the built-in plugins) now just calls `defineDiagnostics({ docsBase,
codes })` — no local reporter, no `colors`/`ansiFormatter` imports.
Delete the per-package `diagnostics-reporter.ts` files and collapse the
host's `defineDiagnostics` to the shared wrapper (it already prepends the
reporter, so no extra merging is needed).
Resolve dependency conflicts in plugins/inspect and plugins/messages package.json: keep main's #238 layout (which moved @devframes/vite to devDependencies) and drop the now-unused nostics dependency, since these plugins reach nostics through devframe/utils/nostics.
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.
Summary
Adds
devframe/utils/nosticsas a thin re-export ofnostics's public API (defineDiagnostics,defineProdDiagnostics,createConsoleReporter,formatDiagnostic, theDiagnosticclass, its supporting types, andansiFormatter), so integrations that build their own codeddiagnostics.tsno longer need a direct dependency onnostics—devframeis already required as a peer.Changes
devframe/utils/nosticsexport (packages/devframe/src/utils/nostics.ts), wired intopackage.jsonexports,tsdown.config.ts(node-only, matching nostics' node-side scope),alias.ts, andtsconfig.base.json.diagnostics.ts(assets,code-server,data-inspector,inspect,messages,og,terminals) now imports fromdevframe/utils/nosticsinstead ofnosticsdirectly, and drops the now-unneedednosticsdependency frompackage.json.@devframes/huband@devframes/json-renderget the same treatment.devframe's own internal diagnostics modules (node/diagnostics.ts,rpc/diagnostics.ts,types/diagnostics.ts,utils/diagnostics-reporter.ts,node/host-diagnostics.ts,adapters/mcp/stringify.ts,cli/connect.ts) switch to the same self-referenced import for consistency with the rest of the codebase'sdevframe/utils/*convention.AGENTS.mdto document the new convention.tsnapiAPI snapshots — a few downstream.d.mtsoutputs now inline thenosticstypes (via the resolveddevframe/utils/nosticspath) instead of referencingimport("nostics"), which fully decouples those packages fromnosticseven at the type level.🤖 Generated with the help of an agent.