Skip to content

Commit ff90e99

Browse files
committed
refactor(plugin-inspect): name the assets package -assets, not -client
'client' is overloaded in devframe (devframe/client is the RPC client; each plugin's ./client export is its panel script), so a package holding prebuilt browser assets reads wrong as '…-client'. Rename @devframes/plugin-inspect-client -> @devframes/plugin-inspect-assets and the directory client-pkg -> assets-pkg, and adopt '${pkg.name}-assets' as the convention for deferred SPA-asset packages.
1 parent a8e57f9 commit ff90e99

9 files changed

Lines changed: 20 additions & 20 deletions

File tree

knip.jsonc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,18 @@
157157
]
158158
},
159159
"plugins/inspect": {
160-
// The lockstep client-assets package is referenced only as a runtime
161-
// string (`${pkg.name}-client` in `cli.distDir`), never imported, so
162-
// knip can't see the dev-only workspace link that makes it resolvable
163-
// in the monorepo. Repeat the `plugins/*` entry glob (a workspace
164-
// config replaces, not merges, it).
160+
// The lockstep assets package is referenced only as a runtime string
161+
// (`${pkg.name}-assets` in `cli.distDir`), never imported, so knip
162+
// can't see the dev-only workspace link that makes it resolvable in
163+
// the monorepo. Repeat the `plugins/*` entry glob (a workspace config
164+
// replaces, not merges, it).
165165
"entry": [
166166
"src/{index,cli,vite,constants,types}.ts",
167167
"src/{client,node,rpc,inject,engine,registry}/index.ts"
168168
],
169-
"ignoreDependencies": ["@devframes/plugin-inspect-client"]
169+
"ignoreDependencies": ["@devframes/plugin-inspect-assets"]
170170
},
171-
"plugins/inspect/client-pkg": {
171+
"plugins/inspect/assets-pkg": {
172172
// Assets-only package: no source, just a prebuilt `dist` produced by
173173
// the sibling plugin's Vite build.
174174
"entry": [],
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "@devframes/plugin-inspect-client",
2+
"name": "@devframes/plugin-inspect-assets",
33
"type": "module",
44
"version": "0.9.0-beta.4",
55
"description": "Prebuilt browser assets (SPA) for @devframes/plugin-inspect, served on demand through devframe's remote-assets back-proxy.",
66
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
77
"license": "MIT",
88
"homepage": "https://github.com/devframes/devframe#readme",
99
"repository": {
10-
"directory": "plugins/inspect/client-pkg",
10+
"directory": "plugins/inspect/assets-pkg",
1111
"type": "git",
1212
"url": "git+https://github.com/devframes/devframe.git"
1313
},

plugins/inspect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"devDependencies": {
6464
"@antfu/design": "catalog:frontend",
6565
"@devframes/hub": "workspace:*",
66-
"@devframes/plugin-inspect-client": "workspace:*",
66+
"@devframes/plugin-inspect-assets": "workspace:*",
6767
"@iconify-json/ph": "catalog:frontend",
6868
"@standard-schema/spec": "catalog:deps",
6969
"@storybook/addon-docs": "catalog:storybook",

plugins/inspect/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { setupInspect } from './node/index'
66
/** Default devframe id — drives the hosted mount path `/__<id>/`. */
77
const DEFAULT_ID = 'devframes_plugin_inspect'
88

9-
// The Vue SPA ships in the lockstep-versioned `@devframes/plugin-inspect-client`
9+
// The Vue SPA ships in the lockstep-versioned `@devframes/plugin-inspect-assets`
1010
// package rather than inside this (slim) node package. `resolveFrom` lets a
1111
// locally installed copy (a workspace link in this monorepo, or an explicit
1212
// `npm install` for air-gapped setups) be served with zero network; otherwise
1313
// the assets stream on demand through devframe's caching CDN back-proxy.
1414
const distDir: RemoteAssets = {
15-
package: `${pkg.name}-client`,
15+
package: `${pkg.name}-assets`,
1616
version: pkg.version,
1717
resolveFrom: import.meta.url,
1818
}

plugins/inspect/src/spa/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export default defineConfig({
2222
// SFCs instead of esbuild pre-bundling them.
2323
optimizeDeps: { exclude: ['@antfu/design'] },
2424
build: {
25-
// Emit into the sibling `@devframes/plugin-inspect-client` package, which
25+
// Emit into the sibling `@devframes/plugin-inspect-assets` package, which
2626
// ships these assets to npm; the node package stays slim and serves them
2727
// on demand through devframe's remote-assets back-proxy.
28-
outDir: fileURLToPath(new URL('../../client-pkg/dist', import.meta.url)),
28+
outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)),
2929
emptyOutDir: true,
3030
},
3131
})

plugins/inspect/test/_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { serveTestContext } from '../../../tests/helpers/serve-test-context'
2020
/**
2121
* Resolve the inspector's SPA to a local directory. Its `distDir` is a
2222
* remote-assets declaration; in this monorepo the lockstep
23-
* `@devframes/plugin-inspect-client` package is workspace-linked, so
23+
* `@devframes/plugin-inspect-assets` package is workspace-linked, so
2424
* resolution short-circuits to its built `dist`. A store (rather than a
2525
* string) means that build hasn't run.
2626
*/

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ trustPolicyExclude:
2626
packages:
2727
- packages/*
2828
- plugins/*
29-
- plugins/*/client-pkg
29+
- plugins/*/assets-pkg
3030
- examples/*
3131
- storybook
3232
- docs

turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@devframes/plugin-inspect#build": {
6666
"outputLogs": "new-only",
6767
"dependsOn": ["devframe#build", "@devframes/vite#build"],
68-
"outputs": ["dist/**", "client-pkg/dist/**"]
68+
"outputs": ["dist/**", "assets-pkg/dist/**"]
6969
},
7070
"@devframes/plugin-og#build": {
7171
"outputLogs": "new-only",

0 commit comments

Comments
 (0)