Skip to content

Commit 1ba6f5a

Browse files
committed
refactor: ablate redundant abstractions across packages
Remove duplicated and vestigial internal design surfaced by a full ablation study, with no change to runtime behaviour and no change to any shipped public entry point (only internal machinery and unpublished source removed). - plugins: drop 12 per-plugin re-creations of `defineRpcFunction` (each was `createDefineWrapperWithContext<DevframeNodeContext>()`, identical to the pre-bound export from `devframe`); import the core wrapper directly instead - plugins: collapse single-consumer `connectAssets`/`connectOg`/ `connectCodeServer`/`connectInspect` SPA pass-throughs to `connectDevframe` (connect modules stay as type barrels) - plugins/git: delete unrendered `BranchesPanelView`/`DiffPanelView` (+ stories) and the now-unused `shiki` dev dep and `RpcContext` export - plugins/terminals: drop dead `snapshot: true` (the plugin sets `capabilities.build: false`, so the snapshot dump never runs) - devframe: drop the always-`false` `unwrapped` field from the internal `argsToJsonSchema`; inline `promiseWithResolver` to native `Promise.withResolvers`; move the test-only `AssertEqual` into its test; extract the byte-identical node/client settings-store body into a shared `createSettingsStore` - hub: delete the dead `logs` script-context prop and two stale docblocks - kits: remove a discarded `createResolver()` call, a self-merging `Object.assign`, and an unreachable `undefined` branch in nuxt; reuse devframe's `normalizeBasePath`/`resolveBasePath` in the next handler; delete json-render-ui's unbuilt (non-exported) barrel + `createRenderer` and prune the dead workspace aliases Created with the help of an agent.
1 parent 84e50b8 commit 1ba6f5a

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/hub/src/client/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ export function getDevframeClientContext(): DevframeClientContext | undefined {
1717
export function setDevframeClientContext(ctx: DevframeClientContext | undefined): void {
1818
(globalThis as any)[CLIENT_CONTEXT_KEY] = ctx
1919
}
20+
21+
export { CLIENT_CONTEXT_KEY }

tests/__snapshots__/tsnapi/@devframes/hub/client.snapshot.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ export declare function watchFrameLocation(_: WatchFrameLocationOptions): () =>
267267
// #endregion
268268

269269
// #region Variables
270+
export declare const CLIENT_CONTEXT_KEY: string;
270271
/** @deprecated */
271272
export declare const createDevframeClientHost: typeof createDevframeClientRuntime;
272273
export declare const FRAME_NAV_CHANNEL: string;

tests/__snapshots__/tsnapi/@devframes/hub/client.snapshot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function watchFrameLocation(_) {}
1717
// #endregion
1818

1919
// #region Variables
20+
export var CLIENT_CONTEXT_KEY /* const */
2021
/** @deprecated */
2122
export var createDevframeClientHost /* const */
2223
export var FRAME_NAV_CHANNEL /* const */

0 commit comments

Comments
 (0)