Skip to content

Commit 174b8bc

Browse files
committed
refactor(plugins): restructure messages/terminals/git and fix inspect typecheck
Adapt the new layout to the three divergent plugins: - messages (Vue) and terminals (Svelte): app/ holds the SPA host plus the Vite-built component library; tsdown builds src/node only; keep the ./client component-lib export; add dev (HMR + node bridge), play, and playgrounds/ - git (Next.js): app/ holds the Next app, src/node/ holds the definition + cli; tsdown builds node, Next builds the app; repoint build/dev scripts and configs - inspect: drop the load-bearing composite tsconfig so its package typechecks fresh (not just via turbo cache), fixing the pre-existing latent type errors it masked (distributive Omit for the history record, string-widened RPC method wrappers, definitions.get access, widened connection backend union, and export DevframeInspectCommandInfo from the root for the dev-server test) - reconcile alias.ts, tsconfig.base.json paths, knip entries, and API snapshots
1 parent b7c5208 commit 174b8bc

162 files changed

Lines changed: 737 additions & 533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

alias.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ export const alias = {
8686
'@devframes/plugin-code-server/cli': p('code-server/src/node/cli.ts'),
8787
'@devframes/plugin-code-server/vite': p('code-server/src/node/vite.ts'),
8888
'@devframes/plugin-code-server': p('code-server/src/node/index.ts'),
89-
'@devframes/plugin-terminals/client': p('terminals/src/client/index.ts'),
90-
'@devframes/plugin-terminals/node': p('terminals/src/node/index.ts'),
91-
'@devframes/plugin-terminals/constants': p('terminals/src/constants.ts'),
92-
'@devframes/plugin-terminals/types': p('terminals/src/types.ts'),
93-
'@devframes/plugin-terminals/cli': p('terminals/src/cli.ts'),
94-
'@devframes/plugin-terminals/vite': p('terminals/src/vite.ts'),
95-
'@devframes/plugin-terminals': p('terminals/src/index.ts'),
96-
'@devframes/plugin-git': p('git/src/index.ts'),
89+
'@devframes/plugin-terminals/client': p('terminals/app/client/index.ts'),
90+
'@devframes/plugin-terminals/node': p('terminals/src/node/setup.ts'),
91+
'@devframes/plugin-terminals/constants': p('terminals/src/node/constants.ts'),
92+
'@devframes/plugin-terminals/types': p('terminals/src/node/types.ts'),
93+
'@devframes/plugin-terminals/cli': p('terminals/src/node/cli.ts'),
94+
'@devframes/plugin-terminals/vite': p('terminals/src/node/vite.ts'),
95+
'@devframes/plugin-terminals': p('terminals/src/node/index.ts'),
96+
'@devframes/plugin-git': p('git/src/node/index.ts'),
9797
'devframe/recipes/interactive-auth': r('devframe/src/recipes/interactive-auth.ts'),
9898
'devframe/recipes/common-rpc-functions': r('devframe/src/recipes/common-rpc-functions.ts'),
9999
'devframe/client': r('devframe/src/client/index.ts'),
@@ -119,13 +119,12 @@ export const alias = {
119119
'@devframes/plugin-a11y/node': p('a11y/src/node/setup.ts'),
120120
'@devframes/plugin-a11y/cli': p('a11y/src/node/cli.ts'),
121121
'@devframes/plugin-a11y': p('a11y/src/node/index.ts'),
122-
'@devframes/plugin-messages/client': p('messages/src/client/index.ts'),
123-
'@devframes/plugin-messages/node': p('messages/src/node/index.ts'),
124-
'@devframes/plugin-messages/constants': p('messages/src/constants.ts'),
125-
'@devframes/plugin-messages/rpc': p('messages/src/rpc/index.ts'),
126-
'@devframes/plugin-messages/cli': p('messages/src/cli.ts'),
127-
'@devframes/plugin-messages/vite': p('messages/src/vite.ts'),
128-
'@devframes/plugin-messages': p('messages/src/index.ts'),
122+
'@devframes/plugin-messages/client': p('messages/app/client/index.ts'),
123+
'@devframes/plugin-messages/node': p('messages/src/node/setup.ts'),
124+
'@devframes/plugin-messages/constants': p('messages/src/node/constants.ts'),
125+
'@devframes/plugin-messages/rpc': p('messages/src/node/rpc/index.ts'),
126+
'@devframes/plugin-messages/cli': p('messages/src/node/cli.ts'),
127+
'@devframes/plugin-messages': p('messages/src/node/index.ts'),
129128
'@devframes/plugin-assets/client-script': p('assets/src/client-script/client/index.ts'),
130129
'@devframes/plugin-assets/node': p('assets/src/node/setup.ts'),
131130
'@devframes/plugin-assets/rpc': p('assets/src/node/rpc/index.ts'),

knip.jsonc

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,22 @@
270270
},
271271
"plugins/assets/assets-pkg": { "entry": [], "project": [] },
272272
"plugins/messages": {
273-
"entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"],
274-
"ignoreDependencies": ["@devframes/plugin-messages--assets"]
273+
"entry": [
274+
"src/node/{index,setup,cli,constants}.ts",
275+
"src/node/rpc/index.ts",
276+
"app/client/index.ts",
277+
"app/**/*.stories.@(ts|tsx)"
278+
],
279+
"ignoreDependencies": ["@devframes/plugin-messages--assets", "@devframes/vite"]
275280
},
276281
"plugins/messages/assets-pkg": { "entry": [], "project": [] },
277282
"plugins/terminals": {
278-
"entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"],
283+
"entry": [
284+
"src/node/{index,setup,cli,constants,types,vite}.ts",
285+
"src/node/rpc/index.ts",
286+
"app/client/index.ts",
287+
"app/**/*.stories.@(ts|tsx)"
288+
],
279289
"ignoreDependencies": ["@devframes/plugin-terminals--assets"]
280290
},
281291
"plugins/terminals/assets-pkg": { "entry": [], "project": [] },
@@ -302,12 +312,16 @@
302312
"ignoreDependencies": ["@devframes/plugin-a11y--assets", "@devframes/vite"]
303313
},
304314
"plugins/git": {
305-
// The React client build's root sits at `src/client` (`next dev
306-
// src/client`), not the workspace root, so knip's default PostCSS
307-
// config glob (workspace-root `postcss.config.*`) misses it.
315+
// The React client build's root sits at `app/` (`next dev app`), not the
316+
// workspace root, so knip's default PostCSS config glob (workspace-root
317+
// `postcss.config.*`) misses it.
308318
"postcss": {
309-
"config": ["src/client/postcss.config.mjs"]
319+
"config": ["app/postcss.config.mjs"]
310320
},
321+
"entry": [
322+
"src/node/{index,cli}.ts",
323+
"app/**/*.stories.@(ts|tsx)"
324+
],
311325
"ignoreDependencies": ["@devframes/plugin-git--assets"]
312326
}
313327
}

plugins/git/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react-oxc'
33
import UnoCSS from 'unocss/vite'
44

55
const config: StorybookConfig = {
6-
stories: ['../src/client/**/*.stories.@(ts|tsx)'],
6+
stories: ['../app/**/*.stories.@(ts|tsx)'],
77
addons: ['@storybook/addon-docs', '@storybook/addon-a11y'],
88
framework: {
99
name: '@storybook/react-vite',

plugins/git/README.md

Lines changed: 1 addition & 1 deletion

plugins/git/src/client/components/commit-details-panel.tsx renamed to plugins/git/app/components/commit-details-panel.tsx

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)