diff --git a/knip.jsonc b/knip.jsonc index db711509..11898832 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -183,6 +183,42 @@ "entry": [], "project": [] }, + // Each plugin's lockstep `--assets` package is referenced only as a + // runtime string (`${pkg.name}--assets` in `cli.distDir`), never imported, + // so knip can't see the dev-only workspace link. A workspace config + // replaces (not merges) the `plugins/*` glob's `entry`, so repeat it. + "plugins/og": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-og--assets"] + }, + "plugins/og/assets-pkg": { "entry": [], "project": [] }, + "plugins/data-inspector": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-data-inspector--assets"] + }, + "plugins/data-inspector/assets-pkg": { "entry": [], "project": [] }, + "plugins/code-server": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-code-server--assets"] + }, + "plugins/code-server/assets-pkg": { "entry": [], "project": [] }, + "plugins/assets": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-assets--assets"] + }, + "plugins/assets/assets-pkg": { "entry": [], "project": [] }, + "plugins/messages": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-messages--assets"] + }, + "plugins/messages/assets-pkg": { "entry": [], "project": [] }, + "plugins/terminals": { + "entry": ["src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts"], + "ignoreDependencies": ["@devframes/plugin-terminals--assets"] + }, + "plugins/terminals/assets-pkg": { "entry": [], "project": [] }, + "plugins/a11y/assets-pkg": { "entry": [], "project": [] }, + "plugins/git/assets-pkg": { "entry": [], "project": [] }, "plugins/a11y": { // `storybook-solidjs-vite` (not an official `@storybook/*` framework // package) doesn't match knip's Storybook plugin trigger, so it never @@ -199,7 +235,8 @@ "src/{index,cli,vite,constants,types}.ts", "src/{client,node,rpc,inject,engine,registry}/index.ts", "src/**/*.stories.tsx" - ] + ], + "ignoreDependencies": ["@devframes/plugin-a11y--assets"] }, "plugins/git": { // The React client build's root sits at `src/client` (`next dev @@ -207,7 +244,8 @@ // config glob (workspace-root `postcss.config.*`) misses it. "postcss": { "config": ["src/client/postcss.config.mjs"] - } + }, + "ignoreDependencies": ["@devframes/plugin-git--assets"] } } } diff --git a/plugins/a11y/README.md b/plugins/a11y/README.md index 8263f4f6..71b35e6e 100644 --- a/plugins/a11y/README.md +++ b/plugins/a11y/README.md @@ -122,6 +122,6 @@ pnpm -C plugins/a11y dev # from source: same, at /__devframes_plugin_a11 | `src/rpc/` | — | `get-config` static RPC + the type-safe client registry | | `src/shared/protocol.ts` | — | the agent ↔ panel `BroadcastChannel` contract | | `src/inject/` | — | the host-page agent (axe scan, highlight overlay, hub messages mirror) → `dist/inject/inject.js` | -| `src/spa/` | — | the Solid panel SPA → `dist/spa` | +| `src/spa/` | — | the Solid panel SPA → `assets-pkg/dist` (ships in `@devframes/plugin-a11y--assets`) | | `demo/` | — | same-origin host page + server (dev + static modes) | | `tests/` | — | dev-server RPC + static-build dump | diff --git a/plugins/a11y/assets-pkg/package.json b/plugins/a11y/assets-pkg/package.json new file mode 100644 index 00000000..29ac3877 --- /dev/null +++ b/plugins/a11y/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-a11y--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-a11y, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/a11y/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-a11y" + } +} diff --git a/plugins/a11y/demo/server.mjs b/plugins/a11y/demo/server.mjs index 0c22ba90..1e608de1 100644 --- a/plugins/a11y/demo/server.mjs +++ b/plugins/a11y/demo/server.mjs @@ -11,7 +11,7 @@ * * Two modes prove the plugin works either way: * - * node demo/server.mjs dev — live WebSocket RPC (`dist/spa`) + * node demo/server.mjs dev — live WebSocket RPC (`assets-pkg/dist`) * node demo/server.mjs build static — baked RPC dump, (`dist/static`) * * The scan/highlight loop is identical in both: it rides the BroadcastChannel, @@ -36,7 +36,7 @@ const devframe = createA11yDevframe() const mode = process.argv[2] === 'build' ? 'build' : 'dev' const basePath = devframe.basePath const injectDir = resolve(ROOT, 'dist/inject') -const panelDir = mode === 'build' ? resolve(ROOT, 'dist/static') : resolve(ROOT, 'dist/spa') +const panelDir = mode === 'build' ? resolve(ROOT, 'dist/static') : resolve(ROOT, 'assets-pkg/dist') function requireBuilt(file, hint) { if (!existsSync(file)) { diff --git a/plugins/a11y/package.json b/plugins/a11y/package.json index 18bae272..1ddd4327 100644 --- a/plugins/a11y/package.json +++ b/plugins/a11y/package.json @@ -52,10 +52,14 @@ "test": "vitest run" }, "peerDependencies": { + "@devframes/plugin-a11y--assets": "workspace:*", "devframe": "workspace:*", "vite": "^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-a11y--assets": { + "optional": true + }, "vite": { "optional": true } @@ -65,6 +69,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-a11y--assets": "workspace:*", "axe-core": "catalog:frontend", "colorjs.io": "catalog:frontend", "devframe": "workspace:*", diff --git a/plugins/a11y/src/index.ts b/plugins/a11y/src/index.ts index 00759d56..be9443f1 100644 --- a/plugins/a11y/src/index.ts +++ b/plugins/a11y/src/index.ts @@ -1,4 +1,4 @@ -import type { DevframeDefinition } from 'devframe' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import { fileURLToPath } from 'node:url' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } @@ -8,10 +8,15 @@ import { setupA11y } from './node/index.ts' const DEFAULT_ID = 'devframes_plugin_a11y' const BASE_PATH = '/__devframes_plugin_a11y/' -// The Solid panel SPA is built (by Vite) into `dist/spa`. From both the -// source entry (`src/index.ts`, via the workspace alias) and the published -// entry (`dist/index.mjs`), `../dist/spa` resolves to `/dist/spa`. -const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) +// The Solid panel SPA ships in the lockstep `@devframes/plugin-a11y--assets` +// package, served on demand through devframe's remote-assets back-proxy; +// `resolveFrom` serves a locally installed copy (a workspace link here) with +// zero network. The host-page agent bundle (`dist/inject`, below) stays here. +const distDir: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} /** * Absolute path to the built in-page **agent** module (`dist/inject/inject.js`) diff --git a/plugins/a11y/src/spa/vite.config.ts b/plugins/a11y/src/spa/vite.config.ts index 37e0d58d..0d5aa6df 100644 --- a/plugins/a11y/src/spa/vite.config.ts +++ b/plugins/a11y/src/spa/vite.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ resolve: { alias }, plugins: [solid(), UnoCSS()], build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/plugins/a11y/tests/_utils.ts b/plugins/a11y/tests/_utils.ts index 080b8a95..594d251f 100644 --- a/plugins/a11y/tests/_utils.ts +++ b/plugins/a11y/tests/_utils.ts @@ -1,11 +1,12 @@ import type { StartedServer } from 'devframe/internal' import { existsSync } from 'node:fs' +import os from 'node:os' import path from 'node:path' import process from 'node:process' -import { fileURLToPath } from 'node:url' import { DEVFRAME_CONNECTION_META_FILENAME } from 'devframe/constants' import { createH3DevframeHost } from 'devframe/internal' import { createHostContext } from 'devframe/node' +import { resolveStaticAssetsSource } from 'devframe/utils/remote-assets' import { mountStaticHandler } from 'devframe/utils/serve-static' import { getPort } from 'get-port-please' import { H3 } from 'h3' @@ -13,15 +14,21 @@ import { resolve } from 'pathe' import { serveTestContext } from '../../../tests/helpers/serve-test-context' import createA11yDevframe from '../src/index' -const HERE = fileURLToPath(new URL('.', import.meta.url)) -const SPA_DIST = resolve(HERE, '../dist/spa') const devframe = createA11yDevframe() -/** Loud failure if the Solid panel hasn't been built — tests serve `dist/spa`. */ +/** Resolve the Solid panel SPA to a local dir — the workspace-linked `--assets` package in dev. */ +function localSpaDir(): string { + const resolved = resolveStaticAssetsSource(devframe.cli!.distDir!, resolve(os.tmpdir(), 'devframes_plugin_a11y-test')) + if (typeof resolved !== 'string') + throw new TypeError('[devframes_plugin_a11y] client SPA missing — run `pnpm -C plugins/a11y run build` first.') + return resolved +} + +/** Loud failure if the Solid panel hasn't been built — tests serve the client SPA. */ export function assertClientBuilt(): void { - if (!existsSync(path.join(SPA_DIST, 'index.html'))) { + if (!existsSync(path.join(localSpaDir(), 'index.html'))) { throw new Error( - '[devframes_plugin_a11y] dist/spa missing — run `pnpm -C plugins/a11y run build` first.', + '[devframes_plugin_a11y] client SPA missing — run `pnpm -C plugins/a11y run build` first.', ) } } @@ -37,9 +44,7 @@ export interface InspectorServer extends StartedServer { * ws transport tests. */ export async function startInspectorServer(): Promise { - const distDir = devframe.cli!.distDir! - if (typeof distDir !== 'string') - throw new TypeError('these tests serve the local dist directory — build the SPA first') + const distDir = localSpaDir() const basePath = devframe.basePath! const host = '127.0.0.1' const port = await getPort({ host, random: true }) diff --git a/plugins/assets/assets-pkg/package.json b/plugins/assets/assets-pkg/package.json new file mode 100644 index 00000000..939a3c5e --- /dev/null +++ b/plugins/assets/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-assets--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-assets, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/assets/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-assets" + } +} diff --git a/plugins/assets/package.json b/plugins/assets/package.json index 5e6320fc..2ff88924 100644 --- a/plugins/assets/package.json +++ b/plugins/assets/package.json @@ -47,10 +47,14 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { + "@devframes/plugin-assets--assets": "workspace:*", "devframe": "workspace:*", "vite": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-assets--assets": { + "optional": true + }, "vite": { "optional": true } @@ -66,6 +70,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-assets--assets": "workspace:*", "@devframes/vite": "workspace:*", "@iconify-json/ph": "catalog:frontend", "@storybook/addon-a11y": "catalog:storybook", diff --git a/plugins/assets/src/index.ts b/plugins/assets/src/index.ts index 616435d1..648ad307 100644 --- a/plugins/assets/src/index.ts +++ b/plugins/assets/src/index.ts @@ -1,7 +1,6 @@ -import type { DevframeDefinition } from 'devframe' -import { fileURLToPath } from 'node:url' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import { defineDevframe } from 'devframe' -import { dirname, resolve } from 'pathe' +import { resolve } from 'pathe' import pkg from '../package.json' with { type: 'json' } import { DEFAULT_PORT } from './constants' import { setupAssets } from './node/index' @@ -10,10 +9,14 @@ import { DEFAULT_ALLOWED_UPLOAD_EXTENSIONS } from './types' export type { AssetImageMeta, AssetInfo, AssetType, CodeSnippet } from './types' export { DEFAULT_ALLOWED_UPLOAD_EXTENSIONS } from './types' -// Package root, resolved one level up from this module — which sits at -// `/src/index.ts` in dev and `/dist/index.mjs` once built, so -// the bundled SPA is always `/dist/spa`. -const PKG_ROOT = dirname(dirname(fileURLToPath(import.meta.url))) +// The SPA ships in the lockstep `@devframes/plugin-assets--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} const DEFAULT_ID = 'devframes_plugin_assets' @@ -93,7 +96,7 @@ export interface AssetsDevframeOptions { */ export function createAssetsDevframe(options: AssetsDevframeOptions = {}): DevframeDefinition { const id = options.id ?? DEFAULT_ID - const distDir = options.distDir ?? resolve(PKG_ROOT, 'dist/spa') + const distDir = options.distDir ?? remoteAssets const write = options.write ?? true const serveStatic = options.serveStatic ?? false // When self-serving (standalone CLI), mount under a dedicated base so the diff --git a/plugins/assets/src/spa/vite.config.ts b/plugins/assets/src/spa/vite.config.ts index 6fd22196..d82a9b1c 100644 --- a/plugins/assets/src/spa/vite.config.ts +++ b/plugins/assets/src/spa/vite.config.ts @@ -28,7 +28,7 @@ export default defineConfig(({ command }) => ({ // its SFCs instead of esbuild pre-bundling them. optimizeDeps: { exclude: ['@antfu/design'] }, build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, })) diff --git a/plugins/code-server/assets-pkg/package.json b/plugins/code-server/assets-pkg/package.json new file mode 100644 index 00000000..38df8e03 --- /dev/null +++ b/plugins/code-server/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-code-server--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-code-server, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/code-server/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-code-server" + } +} diff --git a/plugins/code-server/package.json b/plugins/code-server/package.json index 51ba9b42..70cb38b9 100644 --- a/plugins/code-server/package.json +++ b/plugins/code-server/package.json @@ -50,10 +50,14 @@ "prepack": "turbo run build --filter=@devframes/plugin-code-server" }, "peerDependencies": { + "@devframes/plugin-code-server--assets": "workspace:*", "devframe": "workspace:*", "vite": "^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-code-server--assets": { + "optional": true + }, "vite": { "optional": true } @@ -65,6 +69,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-code-server--assets": "workspace:*", "@iconify-json/ph": "catalog:frontend", "@storybook/addon-docs": "catalog:storybook", "@storybook/vue3-vite": "catalog:storybook", diff --git a/plugins/code-server/src/index.ts b/plugins/code-server/src/index.ts index 1c236154..1330efb7 100644 --- a/plugins/code-server/src/index.ts +++ b/plugins/code-server/src/index.ts @@ -1,7 +1,5 @@ -import type { DevframeDefinition } from 'devframe' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import type { CodeServerOptions } from './types' -import { existsSync } from 'node:fs' -import { fileURLToPath } from 'node:url' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } import { DEFAULT_PORT, PLUGIN_ID } from './constants' @@ -15,10 +13,14 @@ export { } from './constants' export type * from './types' -// The launcher SPA is built (by Vite) into `dist/spa`. From both the source -// entry (`src/index.ts`, via the workspace alias) and the published entry -// (`dist/index.mjs`), `../dist/spa` resolves to `/dist/spa`. -const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) +// The SPA ships in the lockstep `@devframes/plugin-code-server--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} /** * Build a {@link DevframeDefinition} for the code-server panel. The same @@ -37,7 +39,7 @@ const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) * ``` */ export function createCodeServerDevframe(options: CodeServerOptions = {}): DevframeDefinition { - const resolvedDist = options.distDir ?? distDir + const resolvedDist = options.distDir ?? remoteAssets return defineDevframe({ id: PLUGIN_ID, name: 'Code Server', @@ -54,7 +56,7 @@ export function createCodeServerDevframe(options: CodeServerOptions = {}): Devfr port: options.port ?? DEFAULT_PORT, portRange: options.portRange, random: options.random, - distDir: existsSync(resolvedDist) ? resolvedDist : undefined, + distDir: resolvedDist, // Gate the standalone launcher by default; `maybeOpenBrowser` folds the // current OTP into the `--open` URL so the tab lands already trusted. // Hosted adapters supply their own auth layer and ignore this. diff --git a/plugins/code-server/src/spa/vite.config.ts b/plugins/code-server/src/spa/vite.config.ts index 680e37e9..12ab261b 100644 --- a/plugins/code-server/src/spa/vite.config.ts +++ b/plugins/code-server/src/spa/vite.config.ts @@ -27,7 +27,7 @@ export default defineConfig({ // SFCs instead of esbuild pre-bundling them. optimizeDeps: { exclude: ['@antfu/design'] }, build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/plugins/data-inspector/assets-pkg/package.json b/plugins/data-inspector/assets-pkg/package.json new file mode 100644 index 00000000..27a067af --- /dev/null +++ b/plugins/data-inspector/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-data-inspector--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-data-inspector, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/data-inspector/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-data-inspector" + } +} diff --git a/plugins/data-inspector/package.json b/plugins/data-inspector/package.json index 08ee147a..8b2ecd3b 100644 --- a/plugins/data-inspector/package.json +++ b/plugins/data-inspector/package.json @@ -49,10 +49,14 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { + "@devframes/plugin-data-inspector--assets": "workspace:*", "devframe": "workspace:*", "vite": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-data-inspector--assets": { + "optional": true + }, "vite": { "optional": true } @@ -64,6 +68,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-data-inspector--assets": "workspace:*", "@devframes/vite": "workspace:*", "@discoveryjs/discovery": "catalog:frontend", "@iconify-json/ph": "catalog:frontend", diff --git a/plugins/data-inspector/src/index.ts b/plugins/data-inspector/src/index.ts index 04b20d20..f2dd1e86 100644 --- a/plugins/data-inspector/src/index.ts +++ b/plugins/data-inspector/src/index.ts @@ -1,6 +1,4 @@ -import type { DevframeDefinition } from 'devframe' -import { existsSync } from 'node:fs' -import { fileURLToPath } from 'node:url' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } import { setupDataInspector } from './node/index' @@ -11,10 +9,14 @@ const DEFAULT_ID = 'devframes:plugin:data-inspector' /** Preferred standalone CLI port. */ const DEFAULT_PORT = 9014 -// The Vue SPA is built (by Vite) into `dist/spa`. From both the source -// entry (`src/index.ts`, via the workspace alias) and the published -// entry (`dist/index.mjs`), `../dist/spa` resolves to `/dist/spa`. -const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) +// The SPA ships in the lockstep `@devframes/plugin-data-inspector--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} export interface DataInspectorDevframeOptions { /** Override the devframe id (and default mount path). */ @@ -73,7 +75,7 @@ export function createDataInspectorDevframe(options: DataInspectorDevframeOption cli: { command: 'data-inspector', port: options.port ?? DEFAULT_PORT, - distDir: existsSync(distDir) ? distDir : undefined, + distDir: remoteAssets, auth: options.auth ?? true, }, dock: { category: '~builtin' }, diff --git a/plugins/data-inspector/src/spa/vite.config.ts b/plugins/data-inspector/src/spa/vite.config.ts index c7be70a2..a01a6680 100644 --- a/plugins/data-inspector/src/spa/vite.config.ts +++ b/plugins/data-inspector/src/spa/vite.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ // SFCs instead of esbuild pre-bundling them. optimizeDeps: { exclude: ['@antfu/design'] }, build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/plugins/git/assets-pkg/package.json b/plugins/git/assets-pkg/package.json new file mode 100644 index 00000000..52dded2e --- /dev/null +++ b/plugins/git/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-git--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-git, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/git/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-git" + } +} diff --git a/plugins/git/package.json b/plugins/git/package.json index 0b5179c7..0722e65b 100644 --- a/plugins/git/package.json +++ b/plugins/git/package.json @@ -46,6 +46,14 @@ "prepack": "turbo run build --filter=@devframes/plugin-git", "test": "vitest run" }, + "peerDependencies": { + "@devframes/plugin-git--assets": "workspace:*" + }, + "peerDependenciesMeta": { + "@devframes/plugin-git--assets": { + "optional": true + } + }, "dependencies": { "cac": "catalog:deps", "devframe": "workspace:*", @@ -53,6 +61,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-git--assets": "workspace:*", "@floating-ui/react": "catalog:frontend", "@iconify-json/catppuccin": "catalog:frontend", "@pierre/diffs": "catalog:frontend", diff --git a/plugins/git/scripts/build-spa.mjs b/plugins/git/scripts/build-spa.mjs index 4764b149..2e5f439c 100644 --- a/plugins/git/scripts/build-spa.mjs +++ b/plugins/git/scripts/build-spa.mjs @@ -1,4 +1,6 @@ import { cpSync, rmSync } from 'node:fs' -rmSync('dist/client', { recursive: true, force: true }) -cpSync('src/client/out', 'dist/client', { recursive: true }) +// The Next.js static export is the plugin's iframe SPA; it ships in the +// lockstep `@devframes/plugin-git--assets` package, not the node package. +rmSync('assets-pkg/dist', { recursive: true, force: true }) +cpSync('src/client/out', 'assets-pkg/dist', { recursive: true }) diff --git a/plugins/git/src/index.ts b/plugins/git/src/index.ts index 07b592d9..bac9e92a 100644 --- a/plugins/git/src/index.ts +++ b/plugins/git/src/index.ts @@ -1,7 +1,6 @@ -import type { DevframeDefinition } from 'devframe' -import { fileURLToPath } from 'node:url' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import { defineDevframe } from 'devframe' -import { dirname, resolve } from 'pathe' +import { resolve } from 'pathe' import pkg from '../package.json' with { type: 'json' } import { configureGit } from './rpc/context.ts' import { readFunctions, writeFunctions } from './rpc/index.ts' @@ -15,10 +14,15 @@ export type { StageArgs } from './rpc/functions/stage.ts' export type { FileStatusCode, GitStatus, StatusFileEntry } from './rpc/functions/status.ts' export type { UnstageArgs } from './rpc/functions/unstage.ts' -// Package root, resolved one level up from this module — which sits at -// `/src/index.ts` in dev and `/dist/index.mjs` once built, so -// the bundled SPA is always `/dist/client`. -const PKG_ROOT = dirname(dirname(fileURLToPath(import.meta.url))) +// The Next.js static-export SPA ships in the lockstep +// `@devframes/plugin-git--assets` package, served on demand through devframe's +// remote-assets back-proxy; `resolveFrom` serves a locally installed copy (a +// workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} export interface GitDevframeOptions { /** Repository directory to inspect. Defaults to the devframe `cwd`. */ @@ -54,7 +58,7 @@ export interface GitDevframeOptions { * version bump until it stabilizes. */ export function createGitDevframe(options: GitDevframeOptions = {}): DevframeDefinition { - const distDir = options.distDir ?? resolve(PKG_ROOT, 'dist/client') + const distDir = options.distDir ?? remoteAssets return defineDevframe({ id: 'devframes_plugin_git', name: 'Git', diff --git a/plugins/git/test/_utils.ts b/plugins/git/test/_utils.ts index f7ff8a34..034a3ad5 100644 --- a/plugins/git/test/_utils.ts +++ b/plugins/git/test/_utils.ts @@ -1,9 +1,11 @@ import type { DevframeNodeContext } from 'devframe' import type { StartedServer } from 'devframe/internal' import type { GitDevframeOptions } from '../src/index' +import { tmpdir } from 'node:os' import { DEVFRAME_CONNECTION_META_FILENAME } from 'devframe/constants' import { createH3DevframeHost } from 'devframe/internal' import { createHostContext } from 'devframe/node' +import { resolveStaticAssetsSource } from 'devframe/utils/remote-assets' import { mountStaticHandler } from 'devframe/utils/serve-static' import { getPort } from 'get-port-please' import { H3 } from 'h3' @@ -46,9 +48,10 @@ export async function startDashboardServer( options: GitDevframeOptions = {}, ): Promise { const devframe = createGitDevframe(options) - const distDir = devframe.cli!.distDir! + // The client SPA ships in the workspace-linked `--assets` package in dev. + const distDir = resolveStaticAssetsSource(devframe.cli!.distDir!, resolve(tmpdir(), 'devframes_plugin_git-test')) if (typeof distDir !== 'string') - throw new TypeError('these tests serve the local dist directory — build the SPA first') + throw new TypeError('these tests serve the local client SPA — build the plugin first') // The factory leaves basePath adapter-resolved; standalone defaults to '/'. const basePath = devframe.basePath ?? '/' const host = '127.0.0.1' diff --git a/plugins/inspect/package.json b/plugins/inspect/package.json index a48272f6..ab370aac 100644 --- a/plugins/inspect/package.json +++ b/plugins/inspect/package.json @@ -46,10 +46,14 @@ "test": "vitest run" }, "peerDependencies": { + "@devframes/plugin-inspect--assets": "workspace:*", "devframe": "workspace:*", "vite": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-inspect--assets": { + "optional": true + }, "vite": { "optional": true } diff --git a/plugins/messages/assets-pkg/package.json b/plugins/messages/assets-pkg/package.json new file mode 100644 index 00000000..2ee979dd --- /dev/null +++ b/plugins/messages/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-messages--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-messages, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/messages/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-messages" + } +} diff --git a/plugins/messages/package.json b/plugins/messages/package.json index f0091461..3d876314 100644 --- a/plugins/messages/package.json +++ b/plugins/messages/package.json @@ -50,10 +50,14 @@ }, "peerDependencies": { "@devframes/hub": "workspace:*", + "@devframes/plugin-messages--assets": "workspace:*", "devframe": "workspace:*", "vite": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-messages--assets": { + "optional": true + }, "vite": { "optional": true } @@ -64,6 +68,7 @@ "devDependencies": { "@antfu/design": "catalog:frontend", "@devframes/hub": "workspace:*", + "@devframes/plugin-messages--assets": "workspace:*", "@devframes/vite": "workspace:*", "@iconify-json/ph": "catalog:frontend", "@storybook/addon-docs": "catalog:storybook", diff --git a/plugins/messages/src/index.ts b/plugins/messages/src/index.ts index 3a94b4fd..7386cfd3 100644 --- a/plugins/messages/src/index.ts +++ b/plugins/messages/src/index.ts @@ -1,15 +1,18 @@ -import type { DevframeDefinition } from 'devframe' -import { existsSync } from 'node:fs' -import { fileURLToPath } from 'node:url' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } import { DEFAULT_PORT, PLUGIN_ID } from './constants' import { setupMessages } from './node/index' -// The Vue SPA is built (by Vite) into `dist/spa`. From both the source -// entry (`src/index.ts`, via the workspace alias) and the published -// entry (`dist/index.mjs`), `../dist/spa` resolves to `/dist/spa`. -const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) +// The SPA ships in the lockstep `@devframes/plugin-messages--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} +// The panel `clientScript` bundle (`dist/client`) stays in this node package. export interface MessagesDevframeOptions { /** Override the devframe id (and default CLI command / mount path). */ @@ -58,7 +61,7 @@ export function createMessagesDevframe(options: MessagesDevframeOptions = {}): D cli: { command: id, port: options.port ?? DEFAULT_PORT, - distDir: existsSync(distDir) ? distDir : undefined, + distDir: remoteAssets, // Gate the standalone server by default; `maybeOpenBrowser` folds the // current OTP into the `--open` URL so the tab lands already trusted. // Hosted adapters (Vite/hub) supply their own auth layer and ignore this. diff --git a/plugins/messages/src/spa/vite.config.ts b/plugins/messages/src/spa/vite.config.ts index bface442..e70b13e2 100644 --- a/plugins/messages/src/spa/vite.config.ts +++ b/plugins/messages/src/spa/vite.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ // SFCs instead of esbuild pre-bundling them. optimizeDeps: { exclude: ['@antfu/design'] }, build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/plugins/messages/test/_utils.ts b/plugins/messages/test/_utils.ts index 4b659ef6..0da1381f 100644 --- a/plugins/messages/test/_utils.ts +++ b/plugins/messages/test/_utils.ts @@ -12,18 +12,21 @@ import { DEVFRAME_CONNECTION_META_FILENAME } from 'devframe/constants' import { createH3DevframeHost } from 'devframe/internal' import { createHostContext } from 'devframe/node' import { resolveBasePath } from 'devframe/node/hub-internals' +import { resolveStaticAssetsSource } from 'devframe/utils/remote-assets' import { mountStaticHandler } from 'devframe/utils/serve-static' import { getPort } from 'get-port-please' import { H3 } from 'h3' import { serveTestContext } from '../../../tests/helpers/serve-test-context' const messagesDevframe = createMessagesDevframe() -const SPA_DIST = localDistDir(messagesDevframe.cli!.distDir!) +const SPA_DIST = localDistDir() -function localDistDir(source: string | object): string { - if (typeof source !== 'string') - throw new TypeError('these tests serve the local dist directory — build the SPA first') - return source +/** Resolve the SPA to a local dir — the workspace-linked `--assets` package in dev. */ +function localDistDir(): string { + const resolved = resolveStaticAssetsSource(messagesDevframe.cli!.distDir!, path.join(os.tmpdir(), 'devframes_plugin_messages-test')) + if (typeof resolved !== 'string') + throw new TypeError('these tests serve the local client SPA — build the plugin first') + return resolved } /** @@ -60,7 +63,7 @@ interface BootOptions { * warn-and-noop path. */ async function boot(options: BootOptions): Promise { - const distDir = localDistDir(messagesDevframe.cli!.distDir!) + const distDir = localDistDir() const basePath = resolveBasePath(messagesDevframe, 'standalone') const host = '127.0.0.1' const port = await getPort({ host, random: true }) diff --git a/plugins/og/assets-pkg/package.json b/plugins/og/assets-pkg/package.json new file mode 100644 index 00000000..059f81cc --- /dev/null +++ b/plugins/og/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-og--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-og, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/og/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-og" + } +} diff --git a/plugins/og/package.json b/plugins/og/package.json index 88462385..bb0f8639 100644 --- a/plugins/og/package.json +++ b/plugins/og/package.json @@ -48,10 +48,14 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { + "@devframes/plugin-og--assets": "workspace:*", "devframe": "workspace:*", "vite": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-og--assets": { + "optional": true + }, "vite": { "optional": true } @@ -62,6 +66,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-og--assets": "workspace:*", "@devframes/vite": "workspace:*", "@iconify-json/ph": "catalog:frontend", "@storybook/addon-docs": "catalog:storybook", diff --git a/plugins/og/src/index.ts b/plugins/og/src/index.ts index d4ce2013..37ff3f54 100644 --- a/plugins/og/src/index.ts +++ b/plugins/og/src/index.ts @@ -1,13 +1,18 @@ -import type { DevframeDefinition } from 'devframe' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import type { OgFetch } from './types' -import { existsSync } from 'node:fs' -import { fileURLToPath } from 'node:url' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } import { setupOg } from './node/index' const DEFAULT_ID = 'devframes_plugin_og' -const distDir = fileURLToPath(new URL('../dist/spa', import.meta.url)) +// The SPA ships in the lockstep `@devframes/plugin-og--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} export interface OgDevframeOptions { id?: string @@ -43,7 +48,7 @@ export function createOgDevframe(options: OgDevframeOptions = {}): DevframeDefin cli: { command: id, port: options.port ?? 9016, - distDir: existsSync(distDir) ? distDir : undefined, + distDir: remoteAssets, auth: options.auth ?? true, }, dock: { category: '~builtin' }, diff --git a/plugins/og/src/spa/vite.config.ts b/plugins/og/src/spa/vite.config.ts index 62546597..77130d9d 100644 --- a/plugins/og/src/spa/vite.config.ts +++ b/plugins/og/src/spa/vite.config.ts @@ -17,7 +17,7 @@ export default defineConfig({ ], optimizeDeps: { exclude: ['@antfu/design'] }, build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/plugins/og/test/_utils.ts b/plugins/og/test/_utils.ts index 49679d49..90798297 100644 --- a/plugins/og/test/_utils.ts +++ b/plugins/og/test/_utils.ts @@ -1,5 +1,6 @@ import type { StartedServer } from 'devframe/internal' import { existsSync } from 'node:fs' +import os from 'node:os' import path from 'node:path' import process from 'node:process' import { createOgDevframe } from '@devframes/plugin-og' @@ -7,6 +8,7 @@ import { DEVFRAME_CONNECTION_META_FILENAME } from 'devframe/constants' import { createH3DevframeHost } from 'devframe/internal' import { createHostContext } from 'devframe/node' import { resolveBasePath } from 'devframe/node/hub-internals' +import { resolveStaticAssetsSource } from 'devframe/utils/remote-assets' import { mountStaticHandler } from 'devframe/utils/serve-static' import { getPort } from 'get-port-please' import { H3 } from 'h3' @@ -26,9 +28,16 @@ export async function testFetch(_url: string): Promise { const testDevframe = createOgDevframe({ fetch: testFetch }) +/** Resolve the SPA to a local dir — the workspace-linked `--assets` package in dev. */ +function localSpaDir(): string { + const resolved = resolveStaticAssetsSource(testDevframe.cli!.distDir!, path.join(os.tmpdir(), 'devframes_plugin_og-test')) + if (typeof resolved !== 'string') + throw new TypeError('Open Graph client SPA missing. Run the plugin build first.') + return resolved +} + export function assertSpaBuilt(): void { - const distDir = testDevframe.cli!.distDir - if (!distDir || typeof distDir !== 'string' || !existsSync(path.join(distDir, 'index.html'))) + if (!existsSync(path.join(localSpaDir(), 'index.html'))) throw new Error('Open Graph SPA missing. Run the plugin build first.') } @@ -37,9 +46,7 @@ export interface OgServer extends StartedServer { } export async function startOgServer(): Promise { - const distDir = testDevframe.cli!.distDir! - if (typeof distDir !== 'string') - throw new TypeError('these tests serve the local dist directory — build the SPA first') + const distDir = localSpaDir() const basePath = resolveBasePath(testDevframe, 'standalone') const host = '127.0.0.1' const port = await getPort({ host, random: true }) diff --git a/plugins/terminals/assets-pkg/package.json b/plugins/terminals/assets-pkg/package.json new file mode 100644 index 00000000..476204c0 --- /dev/null +++ b/plugins/terminals/assets-pkg/package.json @@ -0,0 +1,30 @@ +{ + "name": "@devframes/plugin-terminals--assets", + "type": "module", + "version": "0.9.0-beta.8", + "description": "Prebuilt browser assets (SPA) for @devframes/plugin-terminals, served on demand through devframe's remote-assets back-proxy.", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/devframes/devframe#readme", + "repository": { + "directory": "plugins/terminals/assets-pkg", + "type": "git", + "url": "git+https://github.com/devframes/devframe.git" + }, + "bugs": "https://github.com/devframes/devframe/issues", + "keywords": [ + "devframe", + "devframe-plugin", + "devtools", + "client-assets" + ], + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "prepack": "turbo run build --filter=@devframes/plugin-terminals" + } +} diff --git a/plugins/terminals/package.json b/plugins/terminals/package.json index 2f79ce00..a2bb910b 100644 --- a/plugins/terminals/package.json +++ b/plugins/terminals/package.json @@ -50,10 +50,14 @@ "prepack": "turbo run build --filter=@devframes/plugin-terminals" }, "peerDependencies": { + "@devframes/plugin-terminals--assets": "workspace:*", "devframe": "workspace:*", "vite": "^8.0.0" }, "peerDependenciesMeta": { + "@devframes/plugin-terminals--assets": { + "optional": true + }, "vite": { "optional": true } @@ -65,6 +69,7 @@ }, "devDependencies": { "@antfu/design": "catalog:frontend", + "@devframes/plugin-terminals--assets": "workspace:*", "@iconify-json/ph": "catalog:frontend", "@storybook/svelte-vite": "catalog:storybook", "@sveltejs/vite-plugin-svelte": "catalog:frontend", diff --git a/plugins/terminals/src/index.ts b/plugins/terminals/src/index.ts index 5c6166e1..93c2a575 100644 --- a/plugins/terminals/src/index.ts +++ b/plugins/terminals/src/index.ts @@ -1,6 +1,5 @@ -import type { DevframeDefinition } from 'devframe' +import type { DevframeDefinition, RemoteAssets } from 'devframe' import type { TerminalsOptions } from './types' -import { fileURLToPath } from 'node:url' import { defineDevframe } from 'devframe' import pkg from '../package.json' with { type: 'json' } import { @@ -38,8 +37,18 @@ export { * }) * ``` */ +// The SPA ships in the lockstep `@devframes/plugin-terminals--assets` package, +// served on demand through devframe's remote-assets back-proxy; `resolveFrom` +// serves a locally installed copy (a workspace link here) with zero network. The panel +// `clientScript` bundle (`dist/client`) stays in this node package. +const remoteAssets: RemoteAssets = { + package: `${pkg.name}--assets`, + version: pkg.version, + resolveFrom: import.meta.url, +} + export function createTerminalsDevframe(options: TerminalsOptions = {}): DevframeDefinition { - const distDir = options.distDir ?? fileURLToPath(new URL('../dist/spa', import.meta.url)) + const distDir = options.distDir ?? remoteAssets return defineDevframe({ id: PLUGIN_ID, diff --git a/plugins/terminals/src/spa/vite.config.ts b/plugins/terminals/src/spa/vite.config.ts index 17e949ec..f5a65739 100644 --- a/plugins/terminals/src/spa/vite.config.ts +++ b/plugins/terminals/src/spa/vite.config.ts @@ -13,7 +13,7 @@ export default defineConfig({ UnoCSS(), ], build: { - outDir: fileURLToPath(new URL('../../dist/spa', import.meta.url)), + outDir: fileURLToPath(new URL('../../assets-pkg/dist', import.meta.url)), emptyOutDir: true, }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 51f2dbb5..ad32ad35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1497,6 +1497,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.7.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-a11y--assets': + specifier: workspace:* + version: link:assets-pkg axe-core: specifier: catalog:frontend version: 4.13.0 @@ -1540,6 +1543,8 @@ importers: specifier: catalog:deps version: 8.21.3 + plugins/a11y/assets-pkg: {} + plugins/assets: dependencies: cac: @@ -1567,6 +1572,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.7.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-assets--assets': + specifier: workspace:* + version: link:assets-pkg '@devframes/vite': specifier: workspace:* version: link:../../packages/vite @@ -1625,6 +1633,8 @@ importers: specifier: catalog:frontend version: 3.5.41(typescript@6.0.3) + plugins/assets/assets-pkg: {} + plugins/code-server: dependencies: '@devframes/vite': @@ -1640,6 +1650,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.7.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-code-server--assets': + specifier: workspace:* + version: link:assets-pkg '@iconify-json/ph': specifier: catalog:frontend version: 1.2.2 @@ -1680,6 +1693,8 @@ importers: specifier: catalog:frontend version: 3.5.41(typescript@6.0.3) + plugins/code-server/assets-pkg: {} + plugins/data-inspector: dependencies: cac: @@ -1695,6 +1710,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.6.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-data-inspector--assets': + specifier: workspace:* + version: link:assets-pkg '@devframes/vite': specifier: workspace:* version: link:../../packages/vite @@ -1753,6 +1771,8 @@ importers: specifier: catalog:frontend version: 3.5.41(typescript@6.0.3) + plugins/data-inspector/assets-pkg: {} + plugins/git: dependencies: cac: @@ -1768,6 +1788,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.7.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.23))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-git--assets': + specifier: workspace:* + version: link:assets-pkg '@floating-ui/react': specifier: catalog:frontend version: 0.27.20(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -1844,6 +1867,8 @@ importers: specifier: catalog:deps version: 8.21.3 + plugins/git/assets-pkg: {} + plugins/inspect: dependencies: cac: @@ -1934,6 +1959,9 @@ importers: '@devframes/hub': specifier: workspace:* version: link:../../packages/hub + '@devframes/plugin-messages--assets': + specifier: workspace:* + version: link:assets-pkg '@devframes/vite': specifier: workspace:* version: link:../../packages/vite @@ -1995,6 +2023,8 @@ importers: specifier: catalog:deps version: 8.21.3 + plugins/messages/assets-pkg: {} + plugins/og: dependencies: cac: @@ -2007,6 +2037,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.6.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-og--assets': + specifier: workspace:* + version: link:assets-pkg '@devframes/vite': specifier: workspace:* version: link:../../packages/vite @@ -2056,6 +2089,8 @@ importers: specifier: catalog:deps version: 8.21.3 + plugins/og/assets-pkg: {} + plugins/terminals: dependencies: '@devframes/vite': @@ -2071,6 +2106,9 @@ importers: '@antfu/design': specifier: catalog:frontend version: 0.3.4(@antfu/utils@9.3.0)(@iconify-json/catppuccin@1.2.17)(@tanstack/vue-virtual@3.13.30(vue@3.5.41(typescript@6.0.3)))(@unocss/core@66.7.5)(colorjs.io@0.7.1)(dompurify@3.4.13)(floating-vue@5.2.2(vue@3.5.41(typescript@6.0.3)))(playwright@1.62.1)(reka-ui@2.10.3(vue@3.5.41(typescript@6.0.3)))(splitpanes@4.1.2(vue@3.5.41(typescript@6.0.3)))(unocss@66.7.5(@unocss/postcss@66.7.5(postcss@8.5.26))(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.0)(jiti@2.7.0)(terser@5.47.1)(tsx@4.23.12)(yaml@2.9.0)))(vue@3.5.41(typescript@6.0.3)) + '@devframes/plugin-terminals--assets': + specifier: workspace:* + version: link:assets-pkg '@iconify-json/ph': specifier: catalog:frontend version: 1.2.2 @@ -2129,6 +2167,8 @@ importers: specifier: catalog:deps version: 8.21.3 + plugins/terminals/assets-pkg: {} + storybook: dependencies: '@antfu/design': diff --git a/turbo.json b/turbo.json index 908e87f9..3a7ae368 100644 --- a/turbo.json +++ b/turbo.json @@ -55,12 +55,12 @@ "@devframes/plugin-code-server#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-terminals#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-inspect#build": { "outputLogs": "new-only", @@ -70,22 +70,22 @@ "@devframes/plugin-og#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-data-inspector#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-messages#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/hub#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-assets#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "hub-vite#build": { "outputLogs": "new-only", @@ -145,12 +145,12 @@ "@devframes/plugin-git#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "@devframes/plugin-a11y#build": { "outputLogs": "new-only", "dependsOn": ["devframe#build", "@devframes/vite#build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", "assets-pkg/dist/**"] }, "files-inspector-example#cli:build": { "outputLogs": "new-only",